package com.itnoob.command1.example.service;

/**
 * 接收者类,商品服务
 * @author zhoujun
 * @date 2025/3/18 23:14
 */
public class ProductService {

    public String getProduct(int productId) throws InterruptedException {
        String result = "智能手机";
        //模拟网络延迟,休眠2s
        Thread.sleep(2000);
        System.out.println("productId" + productId + ",product name: " + result);
        return  result;
    }
}
